package Test;
class A{
    void square(int c[]){
        int i;
        for ( i = 0; i < c.length; i++) {
            c[i] = c[i]*c[i];
        }
    }
    void square(int x){
        x= x*x;
    }

}

public class demo4{
    public static void main(String[] args) {
        A a = new A();
        int x = 10;
        int b[] = {10,20,30,40};
        a.square(b);
        for (int i = 0; i < b.length; i++) {
            System.out.println(b[i]);
        }
        a.square(x);
        System.out.println("x="+x);

    }
}